home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / lib / include / ds5000.md / RCS / signal.h.notused,v < prev    next >
Encoding:
Text File  |  1989-07-08  |  8.6 KB  |  244 lines

  1. head     1.1;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 1.1
  10. date     89.07.08.14.56.12;  author nelson;  state Exp;
  11. branches ;
  12. next     ;
  13.  
  14.  
  15. desc
  16. @Initial version from DECWRL.
  17. @
  18.  
  19.  
  20.  
  21. 1.1
  22. log
  23. @Initial revision
  24. @
  25. text
  26. @/*    @@(#)signal.h    4.1.1.4    (ULTRIX)    11/9/88    */
  27.  
  28. /************************************************************************
  29.  *                                    *
  30.  *            Copyright (c) 1987 by                *
  31.  *        Digital Equipment Corporation, Maynard, MA        *
  32.  *            All rights reserved.                *
  33.  *                                    *
  34.  *   This software is furnished under a license and may be used and    *
  35.  *   copied  only  in accordance with the terms of such license and    *
  36.  *   with the  inclusion  of  the  above  copyright  notice.   This    *
  37.  *   software  or  any  other copies thereof may not be provided or    *
  38.  *   otherwise made available to any other person.  No title to and    *
  39.  *   ownership of the software is hereby transferred.            *
  40.  *                                    *
  41.  *   This software is  derived  from  software  received  from  the    *
  42.  *   University    of   California,   Berkeley,   and   from   Bell    *
  43.  *   Laboratories.  Use, duplication, or disclosure is  subject  to    *
  44.  *   restrictions  under  license  agreements  with  University  of    *
  45.  *   California and with AT&T.                        *
  46.  *                                    *
  47.  *   The information in this software is subject to change  without    *
  48.  *   notice  and should not be construed as a commitment by Digital    *
  49.  *   Equipment Corporation.                        *
  50.  *                                    *
  51.  *   Digital assumes no responsibility for the use  or  reliability    *
  52.  *   of its software on equipment which is not supplied by Digital.    *
  53.  *                                    *
  54.  ************************************************************************/
  55. /************************************************************************
  56.  *            Modification History                *
  57.  *                                    *
  58.  *    Mark Parenti 2/06/88                        *
  59.  *        Change SA_CLDSTOP to SA_NOCLDSTOP per POSIX change    *
  60.  *    Fred Glover 1/12/88                        *
  61.  *        Add SIGLOST - server crash Sys-V lock notification      *
  62.  *                                    *
  63.  *    Larry Cohen 10/1/85                        *
  64.  *        Add SIGWINCH - window change signal            *
  65.  *                                    *
  66.  *    Greg Depp  25 Jun 85                        *
  67.  *    Moved SIGUSR1 and SIGUSR2 to 30 and 31 to conform with Berkeley *
  68.  *                                    *
  69.  *    David L Ballenger, 28-Mar-1985                    *
  70.  * 0001 Add definitions for System V compatibility            *
  71.  *                                    *
  72.  ************************************************************************/
  73.  
  74. #ifndef    NSIG
  75. #define NSIG    32
  76.  
  77. #define    SIGHUP     1    /* hangup */
  78. #define    SIGINT     2    /* interrupt */
  79. #define    SIGQUIT    3    /* quit */
  80. #define    SIGILL     4    /* illegal instruction (not reset when caught) */
  81. #define        ILL_RESAD_FAULT    0x0    /* reserved addressing fault */
  82. #define        ILL_PRIVIN_FAULT    0x1    /* privileged instruction fault */
  83. #define        ILL_RESOP_FAULT    0x2    /* reserved operand fault */
  84. /* CHME, CHMS, CHMU are not yet given back to users reasonably */
  85. #define    SIGTRAP    5    /* trace trap (not reset when caught) */
  86. #define    SIGIOT     6    /* IOT instruction */
  87. #define    SIGEMT     7    /* EMT instruction */
  88. #define    SIGFPE     8    /* floating point exception */
  89. #define        FPE_INTOVF_TRAP    0x1    /* integer overflow */
  90. #define        FPE_INTDIV_TRAP    0x2    /* integer divide by zero */
  91. #define        FPE_FLTOVF_TRAP    0x3    /* floating overflow */
  92. #define        FPE_FLTDIV_TRAP    0x4    /* floating/decimal divide by zero */
  93. #define        FPE_FLTUND_TRAP    0x5    /* floating underflow */
  94. #define        FPE_DECOVF_TRAP    0x6    /* decimal overflow */
  95. #define        FPE_SUBRNG_TRAP    0x7    /* subscript out of range */
  96. #define        FPE_FLTOVF_FAULT    0x8    /* floating overflow fault */
  97. #define        FPE_FLTDIV_FAULT    0x9    /* divide by zero floating fault */
  98. #define        FPE_FLTUND_FAULT    0xa    /* floating underflow fault */
  99. #define    SIGKILL    9    /* kill (cannot be caught or ignored) */
  100. #define    SIGBUS    10    /* bus error */
  101. #define    SIGSEGV   11    /* segmentation violation */
  102. #define    SIGSYS    12    /* bad argument to system call */
  103. #define    SIGPIPE   13    /* write on a pipe with no one to read it */
  104. #define    SIGALRM   14    /* alarm clock */
  105. #define    SIGTERM   15    /* software termination signal from kill */
  106. #define    SIGURG    16    /* urgent condition on IO channel */
  107. #define    SIGSTOP   17    /* sendable stop signal not from tty */
  108. #define    SIGTSTP   18    /* stop signal from tty */
  109. #define    SIGCONT   19    /* continue a stopped process */
  110. #define    SIGCHLD   20    /* to parent on child stop or exit */
  111. #define    SIGTTIN   21    /* to readers pgrp upon background tty read */
  112. #define    SIGTTOU   22    /* like TTIN for output if (tp->t_local<OSTOP) */
  113. #define    SIGIO     23    /* input/output possible signal */
  114. #define    SIGXCPU   24    /* exceeded CPU time limit */
  115. #define    SIGXFSZ   25    /* exceeded file size limit */
  116. #define    SIGVTALRM 26    /* virtual time alarm */
  117. #define    SIGPROF   27    /* profiling time alarm */
  118. #define SIGWINCH  28    /* window size changes */
  119. #define SIGLOST      29    /* Sys-V rec lock: notify user upon server crash */
  120. #define SIGUSR1   30    /* User signal 1 (from SysV) */
  121. #define SIGUSR2   31    /* User signal 2 (from SysV) */
  122.  
  123. /* Add System V signal definitions (DLB001) */
  124. #define SIGCLD    SIGCHLD    /* System V name for SIGCHLD    */
  125. #define SIGABRT    SIGIOT    /* Added from BRL package for /usr/group. Signal
  126.              * returned by abort(3C).  Map onto SIGIOT.
  127.              */
  128. /*
  129.  * Codes for the mips break instruction.
  130.  */
  131. #define    BRK_USERBP    0    /* user bp (used by debuggers) */
  132. #define    BRK_KERNELBP    1    /* kernel bp (used by prom) */
  133. #define    BRK_ABORT    2    /* no longer used */
  134. #define    BRK_BD_TAKEN    3    /* for taken bd emulation */
  135. #define    BRK_BD_NOTTAKEN    4    /* for not taken bd emulation */
  136. #define    BRK_SSTEPBP    5    /* user bp (used by debuggers) */
  137. #define    BRK_OVERFLOW    6    /* overflow check */
  138. #define    BRK_DIVZERO    7    /* divide by zero check */
  139. #define    BRK_RANGE    8    /* range error check */
  140. /* reserve 9 for ada stuff per himel */
  141.  
  142. #if defined(vax) || (defined(mips) && defined(LANGUAGE_C))
  143. #ifndef    SYSTEM_FIVE
  144.  
  145. #define    sigset_t int    /* type used for sigsetops() functions    */
  146. /*
  147.  * Signal vector "template" used in sigvec call.
  148.  */
  149. struct    sigvec {
  150.     void     (*sv_handler)();    /* signal handler */
  151.     sigset_t sv_mask;        /* signal mask to apply */
  152.     int    sv_flags;        /* see signal options below */
  153. };
  154.  
  155. /*
  156.  * The following structure must be exactly the same as the above structure
  157.  * with the names changed for POSIX compliance.
  158.  */
  159. struct    sigaction {
  160.     void     (*sa_handler)();    /* signal handler */
  161.     sigset_t sa_mask;        /* signal mask to apply */
  162.     int     sa_flags;        /* see signal options below */
  163. };
  164. #define SV_ONSTACK      0x0001  /* take signal on signal stack */
  165. #define SV_INTERRUPT    0x0002  /* do not restart system on signal return */
  166. #define    SA_NOCLDSTOP    0x0004    /* Don't generate SIGCLD when children stop */
  167. #define    SV_OLDSIG    0x1000    /* Emulate old signal() for POSIX */
  168. #define sv_onstack sv_flags     /* isn't compatibility wonderful! */
  169.  
  170. /* Defines for sigprocmask() call. POSIX.
  171.  */
  172. #define    SIG_BLOCK    1        /* Add these signals to block mask    */
  173. #define    SIG_UNBLOCK    2        /* Remove these signals from block mask */
  174. #define    SIG_SETMASK    3        /* Set block mask to this mask        */
  175.  
  176. /*
  177.  * Structure used in sigstack call.
  178.  */
  179. struct    sigstack {
  180.     char    *ss_sp;            /* signal stack pointer */
  181.     int    ss_onstack;        /* current status */
  182. };
  183.  
  184. /*
  185.  * Information pushed on stack when a signal is delivered.
  186.  * This is used by the kernel to restore state following
  187.  * execution of the signal handler.  It is also made available
  188.  * to the handler to allow it to properly restore state if
  189.  * a non-standard exit is performed.
  190.  *
  191.  * WARNING: THE sigcontext MUST BE KEPT CONSISTENT WITH /usr/include/setjmp.h
  192.  * AND THE LIBC ROUTINES setjmp() AND longjmp()
  193.  */
  194. struct    sigcontext {
  195.     int    sc_onstack;        /* sigstack state to restore */
  196.     int    sc_mask;        /* signal mask to restore */
  197.     int    sc_pc;            /* pc at time of signal */
  198.     /*
  199.      * General purpose registers
  200.      */
  201.     int    sc_regs[32];    /* processor regs 0 to 31 */
  202.     int    sc_mdlo;    /* mul/div low */
  203.     int    sc_mdhi;    /* mul/div high */
  204.     /*
  205.      * Floating point coprocessor state
  206.      */
  207.     int    sc_ownedfp;    /* fp has been used */
  208.     int    sc_fpregs[32];    /* fp regs 0 to 31 */
  209.     int    sc_fpc_csr;    /* floating point control and status reg */
  210.     int    sc_fpc_eir;    /* floating point exception instruction reg */
  211.     /*
  212.      * END OF REGION THAT MUST AGREE WITH setjmp.h
  213.      * END OF jmp_buf REGION
  214.      */
  215.     /*
  216.      * System coprocessor registers at time of signal
  217.      */
  218.     int    sc_cause;    /* cp0 cause register */
  219.     int    sc_badvaddr;    /* cp0 bad virtual address */
  220.     int    sc_badpaddr;    /* cpu bd bad physical address */
  221. };
  222. #endif    SYSTEM_FIVE
  223.  
  224. #define    BADSIG        ((void (*)())(-1))
  225. #define    SIG_ERR        ((void (*)())(-1))
  226. #define    SIG_DFL        ((void (*)())( 0))
  227. #define    SIG_IGN        ((void (*)())( 1))
  228.  
  229. #ifdef KERNEL
  230. #define    SIG_CATCH    ((void (*)())( 2))
  231. #define    SIG_HOLD    ((void (*)())( 3))
  232. #else KERNEL
  233. extern void        (*signal())();
  234. #endif KERNEL
  235. #endif defined(vax) || (defined(mips) && defined(LANGUAGE_C))
  236.  
  237. /*
  238.  * Macro for converting signal number to a mask suitable for
  239.  * sigblock().
  240.  */
  241. #define sigmask(m)    (1 << ((m)-1))
  242. #endif NSIG
  243. @
  244.